package com.slz3.business.module.messageManagement.mesSystem.steward;

import com.slz3.business.module.messageManagement.mesSystem.domain.MesSystem;
import com.slz3.business.module.messageManagement.mesSystem.domain.MesSystemCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MesSystemResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MesSystem.class).flatMap(mesSystem ->
                MesSystemResController.add(req, mesSystem)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.delete(req, mesSystemCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MesSystem.class).flatMap(mesSystem ->
                MesSystemResController.modify(req, mesSystem)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MesSystemResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MesSystemResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MesSystemResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.auditSubmit(req, mesSystemCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.audit(req, mesSystemCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.auditReject(req, mesSystemCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.usingEnable(req, mesSystemCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MesSystemCondition.class).flatMap(mesSystemCondition ->
                MesSystemResController.usingDisable(req, mesSystemCondition)
        );
    }   

}
